//
//  UploadFileFromValue.m
//  OneStoreFramework
//
//  Created by huangjiming on 6/12/15.
//  Copyright (c) 2015 OneStore. All rights reserved.
//

#import "UploadFileFromValue.h"

@implementation UploadFileFromValue

/**
 *  功能:初始化方法
 */
+ (instancetype)fileValueData:(NSData *)fileData
                     fileName:(NSString *)fileName {
    if (!fileData) {
        return nil;
    }
    if (fileName.length <= 0) {
        fileName = @"file";
    }
    UploadFileFromValue *fileValue = [[self alloc] init];
    fileValue.fileData = fileData;
    fileValue.fileName = fileName;
    return fileValue;
}

@end
